<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        #canvas {
            display: block;
            border: 1px solid #ccc;
            margin: 50px auto;
        }
    </style>
</head>
<body>
    <canvas id="canvas" width="500" height="500">

    </canvas>
    <script>
        window.onload = function () {

            let canvas = document.getElementById('canvas')
            let context = canvas.getContext('2d')
            
            context.strokeStyle = '#005588'
            context.lineWidth = 5

            context.beginPath()
            context.arc(150, 150, 50, 0, 1.5*Math.PI, false)
            context.stroke()

            context.beginPath()
            context.arc(350, 350, 50, 0, 1.5*Math.PI, true)
            context.closePath() // 闭合路径
            context.stroke()

        }
    </script>
</body>
</html>
